//
//  BasicViewController.swift
//  PanModal
//
//  Created by Stephen Sowole on 2/26/19.
//  Copyright © 2019 PanModal. All rights reserved.
//

import UIKit

class BasicViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = #colorLiteral(red: 0.1019607843, green: 0.1137254902, blue: 0.1294117647, alpha: 1)
    }
}

extension BasicViewController: PanModalPresentable {

    override var preferredStatusBarStyle: UIStatusBarStyle {
        return .lightContent
    }

    var panScrollable: UIScrollView? {
        return nil
    }

    var longFormHeight: PanModalHeight {
        return .maxHeightWithTopInset(400)
    }
    
    var backViewCradientLayerColors: [CGColor] {
        return [
            UIColor(red: 0/255, green: 41/255, blue: 255/255, alpha: 1).cgColor,
            UIColor(red: 255/255, green: 92/255, blue: 0/255, alpha: 1).cgColor,
            UIColor(red: 255/255, green: 0/255, blue: 0/255, alpha: 1).cgColor
        ]
    }
    
    var backViewGradientLayer: CAGradientLayer? {
        let gradientLayer = CAGradientLayer()
        gradientLayer.frame = UIScreen.main.bounds
        gradientLayer.colors = [
            UIColor(red: 0/255, green: 41/255, blue: 255/255, alpha: 1).cgColor,
            UIColor(red: 255/255, green: 92/255, blue: 0/255, alpha: 1).cgColor,
            UIColor(red: 255/255, green: 0/255, blue: 0/255, alpha: 1).cgColor
        ]
        gradientLayer.locations = [0.0, 0.1, 1.0]
        return gradientLayer
    }
    
    var backViewAlpha: Double {
        return 0.8
    }

    var anchorModalToLongForm: Bool {
        return false
    }
}
